From: Florian Müllner Date: Fri, 8 Jan 2021 01:14:42 +0000 (+0100) Subject: workspacesView: Fix off-by-one error X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~616^2^2~561 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=9f0e7632a6e1cb94bb9bf71002d548a8cbb2d558;p=gnome-shell.git workspacesView: Fix off-by-one error The scroll adjustment's upper value corresponds to the number of workspaces, not to the last workspace index. We want the latter when mirroring the layout in RTL locales, so subtract 1. Part-of: --- diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js index 865b52b50..12f5ca3a8 100644 --- a/js/ui/workspacesView.js +++ b/js/ui/workspacesView.js @@ -300,7 +300,7 @@ class WorkspacesView extends WorkspacesViewBase { const vertical = workspaceManager.layout_rows === -1; const rtl = this.text_direction === Clutter.TextDirection.RTL; const progress = vertical || !rtl - ? adj.value : adj.upper - adj.value; + ? adj.value : adj.upper - adj.value - 1; for (const ws of this._workspaces) { if (vertical)